home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / azInclude / UDPPB.h < prev    next >
Text File  |  1989-10-04  |  2KB  |  88 lines

  1. /* 
  2.     UDPPB.h    
  3.     C definitions of parameter block entries needed for UDP calls
  4.  
  5.     Copyright Apple Computer, Inc. 1988-89 
  6.     All rights reserved
  7.         
  8.     hacked for Aztec 9/21/89
  9. */
  10.  
  11. #define UDPCreate        20
  12. #define UDPRead            21
  13. #define UDPBfrReturn    22
  14. #define UDPWrite        23
  15. #define UDPRelease        24
  16. #define UDPMaxMTUSize    25
  17. #define UDPCtlMax        29
  18.  
  19. typedef enum UDPEventCode {
  20.     UDPDataArrival = 1,
  21.     UDPICMPReceived,
  22.     lastUDPEvent = 65535
  23.     };
  24.  
  25. /*
  26. typedef pascal void (*UDPNotifyProc) (
  27.         StreamPtr udpStream, 
  28.         unsigned short eventCode, 
  29.         Ptr userDataPtr,
  30.         struct ICMPReport *icmpMsg);
  31. typedef void (*UDPIOCompletionProc) (struct UDPiopb *iopb);
  32. */
  33.  
  34.  
  35. typedef    unsigned short    udp_port;
  36.  
  37. typedef struct UDPCreatePB {            /* for create and release calls */
  38.     Ptr             rcvBuff;
  39.     unsigned long    rcvBuffLen;
  40.     ProcPtr            notifyProc;                    /* UDPNotifyProc */
  41.     unsigned short    localPort;
  42.     Ptr                userDataPtr;
  43. } UDPCreatePB;
  44.     
  45. typedef struct UDPSendPB {
  46.     unsigned short    reserved;
  47.     ip_addr            remoteHost;
  48.     udp_port        remotePort;
  49.     Ptr                wdsPtr;
  50.     Boolean            checkSum;    
  51.     unsigned short    sendLength;
  52.     Ptr                userDataPtr;
  53. } UDPSendPB;
  54.     
  55. typedef struct UDPReceivePB {        /* for receive and buffer return calls */
  56.     unsigned short    timeOut;
  57.     ip_addr            remoteHost;
  58.     udp_port        remotePort;
  59.     Ptr             rcvBuff;
  60.     unsigned short    rcvBuffLen;
  61.     unsigned short    secondTimeStamp;
  62.     Ptr                 userDataPtr;
  63. } UDPReceivePB;
  64.  
  65. typedef struct UDPMTUPB {
  66.     unsigned short     mtuSize;
  67.     ip_addr            remoteHost;
  68.     Ptr                userDataPtr;
  69. } UDPMTUPB;
  70.  
  71. typedef struct UDPiopb {
  72.     char                 fill12[12];
  73.     long                (*ioCompletion)();    /* UDPIOCompletionProc */
  74.     short                 ioResult;
  75.     char                 *ioNamePtr;        
  76.     short                 ioVRefNum;        
  77.     short                ioCRefNum;            
  78.     short                 csCode;
  79.     StreamPtr             udpStream;                
  80.     union {
  81.         struct UDPCreatePB    create;
  82.         struct UDPSendPB    send;
  83.         struct UDPReceivePB    receive;
  84.         struct UDPMTUPB        mtu;
  85.     } csParam;
  86. } UDPiopb;
  87.     
  88.